Skip to content

用户openid转换

将另一个应用的用户openid转换为指定appid应用下的用户openid

请求参数类型描述
openidstring用户openid
jsonobject声明请求的JSON数据结构
appidstring目标应用的appid
php
$instance->v3->express->users->_openid_->transform->postAsync([
  'openid' => 'xsd3434454567676',
  'json' => [
    'appid' => 'wxaaaa1a123b456c7d',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/express/users/{openid}/transform')->postAsync([
  'openid' => 'xsd3434454567676',
  'json' => [
    'appid' => 'wxaaaa1a123b456c7d',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/express/users/{openid}/transform']->postAsync([
  'openid' => 'xsd3434454567676',
  'json' => [
    'appid' => 'wxaaaa1a123b456c7d',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->express->users->_openid_->transform->post([
  'openid' => 'xsd3434454567676',
  'json' => [
    'appid' => 'wxaaaa1a123b456c7d',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/express/users/{openid}/transform')->post([
  'openid' => 'xsd3434454567676',
  'json' => [
    'appid' => 'wxaaaa1a123b456c7d',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/express/users/{openid}/transform']->post([
  'openid' => 'xsd3434454567676',
  'json' => [
    'appid' => 'wxaaaa1a123b456c7d',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
openidstring转换后的openid

参阅 官方文档

Published on the GitHub by TheNorthMemory